<#macro permission parentCode>
    <@sysPermissionList code=parentCode menu=true>
       	<ul class="vertical-nav-menu metismenu mm-collapse">
			<#list permissions as p>
		        <#if p?size gt 0>
			        <li>
			        	<#if p.hasChildren>
				            <a href="#" aria-expanded="true" class="menu-item-top" id="${p.code!}">
				                <i class="metismenu-icon ${p.icon!}"></i>
				                <span>${p.name}</span>
				                <i class="metismenu-state-icon pe-7s-angle-down caret-left"></i>
				            </a>
			        	<#else>
		                    <a href="#" data-url="${p.url!}" class="menu-item" id="${p.code!}" name="${p.name}">
		                        <i class="metismenu-icon ${p.icon!}"></i>
		                        <span>${p.name}</span>
		                    </a>
			        	</#if>
        				<#if p.hasChildren>
							<@permission parentCode=p.code/>
						</#if>
			        </li>
		        </#if>
		    </#list>
	    </ul>
	</@sysPermissionList>
</#macro>
<div class="app-sidebar sidebar-shadow bg-secondary sidebar-text-light">
	<div class="app-header__logo">
		<div class="logo-src"></div>
		<div class="header__pane ml-auto">
			<div>
				<button type="button" class="hamburger close-sidebar-btn hamburger--elastic" data-class="closed-sidebar">
					<span class="hamburger-box"> <span class="hamburger-inner"></span>
					</span>
				</button>
			</div>
		</div>
	</div>
	<div class="app-header__mobile-menu">
		<div>
			<button type="button" class="hamburger hamburger--elastic mobile-toggle-nav">
				<span class="hamburger-box">
					<span class="hamburger-inner"></span>
				</span>
			</button>
		</div>
	</div>
	<div class="app-header__menu">
		<span>
			<button type="button" class="btn-icon btn-icon-only btn btn-primary btn-sm mobile-toggle-header-nav">
				<span class="btn-icon-wrapper">
					<i class="fa fa-ellipsis-v fa-w-6"></i>
				</span>
			</button>
		</span>
	</div>
	<div class="scrollbar-sidebar">
		<div class="app-sidebar__inner"><@permission parentCode='root'/></div>
	</div>
</div>